//
//  CommentEntity.m
//  SXH
//
//  Created by 房 国生 on 15/7/17.
//  Copyright (c) 2015年 lyss. All rights reserved.
//

#import "CommentEntity.h"

@implementation CommentEntity

- (instancetype)initWithAttributes:(NSDictionary *)attributes {
    
    self = [super init];
    if (!self) {
        return nil;
    }
    
    self.ID= [attributes valueForKeyPath:@"id"];
    self.insert_time = [attributes valueForKeyPath:@"insert_time"];
    self.content = [attributes valueForKeyPath:@"content"];
    self.userid = [attributes valueForKeyPath:@"user_id"];
    self.album = [NSString stringWithFormat:@"%@/%@", IMAGE_URL, [attributes valueForKeyPath:@"album"]];
    self.userAlbum = [NSString stringWithFormat:@"%@/%@", IMAGE_URL, [attributes valueForKeyPath:@"user_album"]];
    self.nickname = [attributes valueForKeyPath:@"nickname"];
    
    return self;
}

@end
